<html>
    <head>
        <title>登录页</title>
        <link rel="stylesheet" type="text/css" href="Css/beijing1.css">
        <link rel="stylesheet" type="text/css" href="Css/xu.css">
        <script type="text/javascript">
            function fun1(obj)
            {     
               var f1=document.getElementById(obj);
               f1.style.display="block";
            }
            function fun2(obj)
            {      
               var f1=document.getElementById(obj);
               f1.style.display="none";
            }
            function getTime(){
                var t=new Date;
                var y=t.getFullYear();
                var m=t.getMonth()+1;
                var d=t.getDate();
                var h=t.getHours();
                var min=t.getMinutes();
                var s=t.getSeconds();
                var time=y+"年"+m+"月"+d+"日"+","+h+":"+min+":"+s;
                document.getElementById("btm").innerHTML=time;
                setTimeout('getTime()',1000);
            }
            function fun3(){
                var n=document.getElementsByClassName("in");
                if(n[0].value==""||n[0].value==null){
                    alert("手机号为必填项");
                    return false;
                }
                var patt=/^\d+$|^\d+[.]?\d+$/;              
                if(patt.test(n[0].value)){
                    return true;
                }
                else{
                    alert("手机号需要是数字");
                    return false;
                }
            }
            function fun4(){
                var n=document.getElementsByClassName("in");
                if(n[1].value==""){
                    alert("密码为必填项");
                    return false;
                }
                return true;
            }
            function fun5(){
                if(fun3()&&fun4()){
                    window.location.href="lianxi.html";
                }
            }        
            </script>
    </head>
    <body  onload="getTime()">
        <video  autoplay="autoplay" loop="loop" muted="muted" style="width: 100%;"><source src="video/v6.mp4" type="video/mp4"></video>
        <div class="title">                             <!--标题栏-->                     
            <ul>             
                <li style="border-radius: 0; width: 40px"><a href="index.html"><img src="Img/touxiang1.png" width="40px" height="40px"></a></li>
                <li>个人博客</li>
                <li style="margin-left: 15%"><a href="index.html" target="_blank">首页</a></li>
                <li><a href="shici.html" target="_blank">诗词</a></li>
                <li><a href="wenzhang.html" target="_blank">文章</a></li>
                <li onmouseover="fun1('f1')" onmouseout="fun2('f1')"><a href="#">关于我</a>
                    <ul id="f1">
                        <li><a href="dengluye.html" target="_blank">留言联系</a></li>
                        <li><a href="zuozhe.html" target="_blank">关于作者</a></li>
                        <li><a href="banquan.html" target="_blank">版权声明</a></li>
                    </ul>
                </li>
            </ul>
            <div class="search">
                <input name="search" type="text" placeholder="搜索">
                <input name="submit" type="image" src="Img/sousuo.png" style="left:140px;">
            </div>
        </div>           
        <div style="width: 70%; height: 400px; margin-left: 15%; margin-top: 60px;">        <!--内容-->
            <div style="width: 60%; height: 400px; margin-left: 20%; margin-top: 150px; border-radius: 15px; border: 5px black solid;">
                <img src="Img/denglu3.jpg" style="width: 41.8%; height: 400px; border-radius: 10px; z-index: -1; position: fixed;">
                <div>
                    <div style="height: 40px; text-align: center; color: black; font-size: 25px; margin-top: 30px;">
                        手机账号登录
                    </div>
                    <div style="height: 20px;"></div>
                    <div style="width: 70%; height: 200px; margin-left: 15%; border-radius: 15px;">
                        <form method="POST">
                            <input type="text" name="user" placeholder="  请输入手机号" class="in" onchange="fun3()">
                            <input type="password" name="password" placeholder="  请输入密码" class="in" onchange="fun4()">
                            <div style="height: 20px;"></div>
                            <input type="button" value="登录/注册" class="in" onclick="fun5()" style="border-radius: 15px; text-align: center; width: 40%; margin-left: 30%; background: rgb(0, 140, 255); color: white;">
                        </form>
                    </div>
                    <div style="height: 50px;"></div>
                    <div style="height: 30px; text-align: center; color: grey;">
                        未注册手机验证后自动登录，隐私将受到网站保护
                    </div>
                </div>
            </div>
        </div>
        <div class="bottom" id="btm" style="bottom: 0px;">                        <!--底部-->
            时间
        </div>
        <div class="tool" id="f2">                 <!--工具栏-->
            <a href="#top"><div class="toolBox"><img src="Img/zhiding.jpg" class="toolImg"></div></a>
            <a href="index.html"><div class="toolBox"><img src="Img/shouye.jpg" class="toolImg"></div></a>
            <a href="dengluye.html"><div class="toolBox"><img src="Img/youjian.jpg" class="toolImg"></div></a>
        </div>
    </body>
</html>